using UnityEngine;

public class EnemySelecter : MonoBehaviour
{
	[HideInInspector]
	public Enemy0 SCRT_Enemy0;

	[HideInInspector]
	public Enemy1 SCRT_Enemy1;

	[HideInInspector]
	public Enemy2 SCRT_Enemy2;

	[HideInInspector]
	public Enemy5 SCRT_Enemy5;

	[HideInInspector]
	public Enemy9 SCRT_Enemy9;

	[HideInInspector]
	public Enemy10 SCRT_Enemy10;

	[HideInInspector]
	public Enemy11 SCRT_Enemy11;

	[HideInInspector]
	public Enemy12 SCRT_Enemy12;

	[HideInInspector]
	public Enemy100 SCRT_Enemy100;

	[HideInInspector]
	public Enemy101 SCRT_Enemy101;

	private int enemyNumber;

	private void Awake()
	{
		if ((bool)GetComponent<Enemy0>())
		{
			enemyNumber = 0;
			SCRT_Enemy0 = GetComponent<Enemy0>();
		}
		else if ((bool)GetComponent<Enemy1>())
		{
			enemyNumber = 1;
			SCRT_Enemy1 = GetComponent<Enemy1>();
		}
		else if ((bool)GetComponent<Enemy2>())
		{
			enemyNumber = 2;
			SCRT_Enemy2 = GetComponent<Enemy2>();
		}
		else if ((bool)GetComponent<Enemy5>())
		{
			enemyNumber = 5;
			SCRT_Enemy5 = GetComponent<Enemy5>();
		}
		else if ((bool)GetComponent<Enemy9>())
		{
			enemyNumber = 9;
			SCRT_Enemy9 = GetComponent<Enemy9>();
		}
		else if ((bool)GetComponent<Enemy10>())
		{
			enemyNumber = 10;
			SCRT_Enemy10 = GetComponent<Enemy10>();
		}
		else if ((bool)GetComponent<Enemy11>())
		{
			enemyNumber = 11;
			SCRT_Enemy11 = GetComponent<Enemy11>();
		}
		else if ((bool)GetComponent<Enemy12>())
		{
			enemyNumber = 12;
			SCRT_Enemy12 = GetComponent<Enemy12>();
		}
		else if ((bool)GetComponent<Enemy100>())
		{
			enemyNumber = 100;
			SCRT_Enemy100 = GetComponent<Enemy100>();
		}
		else if ((bool)GetComponent<Enemy101>())
		{
			enemyNumber = 101;
			SCRT_Enemy101 = GetComponent<Enemy101>();
		}
	}

	public void Init(int objNum, int kindOfWeapon = 0)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.Init(objNum);
			break;
		case 1:
			SCRT_Enemy1.Init(objNum, kindOfWeapon);
			break;
		case 2:
			SCRT_Enemy2.Init(objNum);
			break;
		case 5:
			SCRT_Enemy5.Init(objNum);
			break;
		case 9:
			SCRT_Enemy9.Init(objNum, kindOfWeapon);
			break;
		case 10:
			SCRT_Enemy10.Init(objNum, kindOfWeapon);
			break;
		case 11:
			SCRT_Enemy11.Init(objNum);
			break;
		case 12:
			SCRT_Enemy12.Init(objNum);
			break;
		case 100:
			SCRT_Enemy100.Init(objNum, kindOfWeapon);
			break;
		case 101:
			SCRT_Enemy101.Init(objNum, kindOfWeapon);
			break;
		}
	}

	public bool CheckAttackingNow()
	{
		switch (enemyNumber)
		{
		case 0:
			return SCRT_Enemy0.attackingNow;
		case 1:
			return SCRT_Enemy1.attackingNow;
		case 2:
			return SCRT_Enemy2.attackingNow;
		case 5:
			return SCRT_Enemy5.attackingNow;
		case 9:
			return SCRT_Enemy9.attackingNow;
		case 10:
			return SCRT_Enemy10.attackingNow;
		case 11:
			return SCRT_Enemy11.attackingNow;
		case 12:
			return SCRT_Enemy12.attackingNow;
		case 100:
			return SCRT_Enemy100.attackingNow;
		case 101:
			return SCRT_Enemy101.attackingNow;
		default:
			return false;
		}
	}

	public int GetKindOfWeaponNumber()
	{
		switch (enemyNumber)
		{
		case 0:
			return SCRT_Enemy0.GetKindOfWeaponNumber();
		case 1:
			return SCRT_Enemy1.GetKindOfWeaponNumber();
		case 2:
			return SCRT_Enemy2.GetKindOfWeaponNumber();
		case 5:
			return SCRT_Enemy5.GetKindOfWeaponNumber();
		case 9:
			return SCRT_Enemy9.GetKindOfWeaponNumber();
		case 10:
			return SCRT_Enemy10.GetKindOfWeaponNumber();
		case 11:
			return SCRT_Enemy11.GetKindOfWeaponNumber();
		case 12:
			return SCRT_Enemy12.GetKindOfWeaponNumber();
		case 100:
			return SCRT_Enemy100.GetKindOfWeaponNumber();
		case 101:
			return SCRT_Enemy101.GetKindOfWeaponNumber();
		default:
			return 0;
		}
	}

	public void SetAttackInfo(int kindOfWeapon, int power, Vector2 force)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 1:
			SCRT_Enemy1.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 2:
			SCRT_Enemy2.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 5:
			SCRT_Enemy5.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 9:
			SCRT_Enemy9.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 10:
			SCRT_Enemy10.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 11:
			SCRT_Enemy11.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 12:
			SCRT_Enemy12.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 100:
			SCRT_Enemy100.SetAttackInfo(kindOfWeapon, power, force);
			break;
		case 101:
			SCRT_Enemy101.SetAttackInfo(kindOfWeapon, power, force);
			break;
		}
	}

	public AttackInfo GetAttackInfo()
	{
		switch (enemyNumber)
		{
		case 0:
			return SCRT_Enemy0.GetAttackInfo();
		case 1:
			return SCRT_Enemy1.GetAttackInfo();
		case 2:
			return SCRT_Enemy2.GetAttackInfo();
		case 5:
			return SCRT_Enemy5.GetAttackInfo();
		case 9:
			return SCRT_Enemy9.GetAttackInfo();
		case 10:
			return SCRT_Enemy10.GetAttackInfo();
		case 11:
			return SCRT_Enemy11.GetAttackInfo();
		case 12:
			return SCRT_Enemy12.GetAttackInfo();
		case 100:
			return SCRT_Enemy100.GetAttackInfo();
		case 101:
			return SCRT_Enemy101.GetAttackInfo();
		default:
			return null;
		}
	}

	public void AttackingNowSwitch(bool swt)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.attackingNow = swt;
			break;
		case 1:
			SCRT_Enemy1.attackingNow = swt;
			break;
		case 2:
			SCRT_Enemy2.attackingNow = swt;
			break;
		case 5:
			SCRT_Enemy5.attackingNow = swt;
			break;
		case 9:
			SCRT_Enemy9.attackingNow = swt;
			break;
		case 10:
			SCRT_Enemy10.attackingNow = swt;
			break;
		case 11:
			SCRT_Enemy11.attackingNow = swt;
			break;
		case 12:
			SCRT_Enemy12.attackingNow = swt;
			break;
		case 100:
			SCRT_Enemy100.attackingNow = swt;
			break;
		case 101:
			SCRT_Enemy101.attackingNow = swt;
			break;
		}
	}

	public void SetFreezingTIme(float time)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.SetFreezingTIme(time);
			break;
		case 1:
			SCRT_Enemy1.SetFreezingTIme(time);
			break;
		case 2:
			SCRT_Enemy2.SetFreezingTIme(time);
			break;
		case 5:
			SCRT_Enemy5.SetFreezingTIme(time);
			break;
		case 9:
			SCRT_Enemy9.SetFreezingTIme(time);
			break;
		case 10:
			SCRT_Enemy10.SetFreezingTIme(time);
			break;
		case 11:
			SCRT_Enemy11.SetFreezingTIme(time);
			break;
		case 12:
			SCRT_Enemy12.SetFreezingTIme(time);
			break;
		case 100:
			SCRT_Enemy100.SetFreezingTIme(time);
			break;
		case 101:
			SCRT_Enemy101.SetFreezingTIme(time);
			break;
		}
	}

	public void ChangeGravityScale(float amount)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.rb.gravityScale = amount;
			break;
		case 1:
			SCRT_Enemy1.rb.gravityScale = amount;
			break;
		case 2:
			SCRT_Enemy2.rb.gravityScale = amount;
			break;
		case 5:
			SCRT_Enemy5.rb.gravityScale = amount;
			break;
		case 9:
			SCRT_Enemy9.rb.gravityScale = amount;
			break;
		case 10:
			SCRT_Enemy10.rb.gravityScale = amount;
			break;
		case 11:
			SCRT_Enemy11.rb.gravityScale = amount;
			break;
		case 12:
			SCRT_Enemy12.rb.gravityScale = amount;
			break;
		case 100:
			SCRT_Enemy100.rb.gravityScale = amount;
			break;
		case 101:
			SCRT_Enemy101.rb.gravityScale = amount;
			break;
		}
	}

	public int TotalAttackPower()
	{
		switch (enemyNumber)
		{
		case 0:
			return SCRT_Enemy0.AttackPower();
		case 1:
			return SCRT_Enemy1.AttackPower();
		case 2:
			return SCRT_Enemy2.AttackPower();
		case 5:
			return SCRT_Enemy5.AttackPower();
		case 9:
			return SCRT_Enemy9.AttackPower();
		case 10:
			return SCRT_Enemy10.AttackPower();
		case 11:
			return SCRT_Enemy11.AttackPower();
		case 12:
			return SCRT_Enemy12.AttackPower();
		case 100:
			return SCRT_Enemy100.AttackPower();
		case 101:
			return SCRT_Enemy101.AttackPower();
		default:
			return 0;
		}
	}

	public void AttackZoneColOn(bool swt, string kindOfCOL = "BoxCol")
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 1:
			SCRT_Enemy1.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 2:
			SCRT_Enemy2.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 5:
			SCRT_Enemy5.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 9:
			SCRT_Enemy9.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 10:
			SCRT_Enemy10.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 11:
			SCRT_Enemy11.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 12:
			SCRT_Enemy12.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 100:
			SCRT_Enemy100.AttackZoneColOn(swt, kindOfCOL);
			break;
		case 101:
			SCRT_Enemy101.AttackZoneColOn(swt, kindOfCOL);
			break;
		}
	}

	public void RunningSpeed()
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.rb.velocity = new Vector2((!(SCRT_Enemy0.tf.localScale.x < 0f)) ? (-SCRT_Enemy0.runningSpeed) : SCRT_Enemy0.runningSpeed, SCRT_Enemy0.rb.velocity.y);
			break;
		case 1:
			SCRT_Enemy1.rb.velocity = new Vector2((!(SCRT_Enemy1.tf.localScale.x < 0f)) ? (-SCRT_Enemy1.runningSpeed) : SCRT_Enemy1.runningSpeed, SCRT_Enemy1.rb.velocity.y);
			break;
		case 2:
			SCRT_Enemy2.rb.velocity = new Vector2((!(SCRT_Enemy2.tf.localScale.x < 0f)) ? (-SCRT_Enemy2.runningSpeed) : SCRT_Enemy2.runningSpeed, SCRT_Enemy2.rb.velocity.y);
			break;
		case 5:
			SCRT_Enemy5.rb.velocity = new Vector2((!(SCRT_Enemy5.tf.localScale.x < 0f)) ? (-SCRT_Enemy5.runningSpeed) : SCRT_Enemy5.runningSpeed, SCRT_Enemy5.rb.velocity.y);
			break;
		case 9:
			SCRT_Enemy9.rb.velocity = new Vector2((!(SCRT_Enemy9.tf.localScale.x < 0f)) ? (-SCRT_Enemy9.runningSpeed) : SCRT_Enemy9.runningSpeed, SCRT_Enemy9.rb.velocity.y);
			break;
		case 10:
			SCRT_Enemy10.rb.velocity = new Vector2((!(SCRT_Enemy10.tf.localScale.x < 0f)) ? (-SCRT_Enemy10.runningSpeed) : SCRT_Enemy10.runningSpeed, SCRT_Enemy10.rb.velocity.y);
			break;
		case 11:
			SCRT_Enemy11.rb.velocity = new Vector2((!(SCRT_Enemy11.tf.localScale.x < 0f)) ? (-SCRT_Enemy11.runningSpeed) : SCRT_Enemy11.runningSpeed, SCRT_Enemy11.rb.velocity.y);
			break;
		case 12:
			SCRT_Enemy12.rb.velocity = new Vector2((!(SCRT_Enemy12.tf.localScale.x < 0f)) ? (-SCRT_Enemy12.runningSpeed) : SCRT_Enemy12.runningSpeed, SCRT_Enemy12.rb.velocity.y);
			break;
		case 100:
			SCRT_Enemy100.rb.velocity = new Vector2((!(SCRT_Enemy100.tf.localScale.x < 0f)) ? (-SCRT_Enemy100.runningSpeed) : SCRT_Enemy100.runningSpeed, SCRT_Enemy100.rb.velocity.y);
			break;
		case 101:
			SCRT_Enemy101.rb.velocity = new Vector2((!(SCRT_Enemy101.tf.localScale.x < 0f)) ? (-SCRT_Enemy101.runningSpeed) : SCRT_Enemy101.runningSpeed, SCRT_Enemy101.rb.velocity.y);
			break;
		}
	}

	public void VelocityZero()
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.rb.velocity = Vector2.zero;
			break;
		case 1:
			SCRT_Enemy1.rb.velocity = Vector2.zero;
			break;
		case 2:
			SCRT_Enemy2.rb.velocity = Vector2.zero;
			break;
		case 5:
			SCRT_Enemy5.rb.velocity = Vector2.zero;
			break;
		case 9:
			SCRT_Enemy9.rb.velocity = Vector2.zero;
			break;
		case 10:
			SCRT_Enemy10.rb.velocity = Vector2.zero;
			break;
		case 11:
			SCRT_Enemy11.rb.velocity = Vector2.zero;
			break;
		case 12:
			SCRT_Enemy12.rb.velocity = Vector2.zero;
			break;
		case 100:
			SCRT_Enemy100.rb.velocity = Vector2.zero;
			break;
		case 101:
			SCRT_Enemy101.rb.velocity = Vector2.zero;
			break;
		}
	}

	public void DashMotion()
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.at.Play(SCRT_Enemy0.dash_NormalList[0], -1, 0f);
			break;
		case 1:
			SCRT_Enemy1.at.Play(SCRT_Enemy1.dash_NormalList[0], -1, 0f);
			break;
		case 2:
			SCRT_Enemy2.at.Play(SCRT_Enemy2.dash_NormalList[0], -1, 0f);
			break;
		case 5:
			SCRT_Enemy5.at.Play(SCRT_Enemy5.dash_NormalList[0], -1, 0f);
			break;
		case 9:
			SCRT_Enemy9.at.Play(SCRT_Enemy9.dash_NormalList[0], -1, 0f);
			break;
		case 10:
			SCRT_Enemy10.at.Play(SCRT_Enemy10.dash_NormalList[0], -1, 0f);
			break;
		case 11:
			SCRT_Enemy11.at.Play(SCRT_Enemy11.dash_NormalList[0], -1, 0f);
			break;
		case 12:
			SCRT_Enemy12.at.Play(SCRT_Enemy12.dash_NormalList[0], -1, 0f);
			break;
		case 100:
			SCRT_Enemy100.at.Play(SCRT_Enemy100.dash_NormalList[0], -1, 0f);
			break;
		case 101:
			SCRT_Enemy101.at.Play(SCRT_Enemy101.dash_NormalList[0], -1, 0f);
			break;
		}
	}

	public void Throwing(int kind)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.Throwing(kind);
			break;
		case 1:
			SCRT_Enemy1.Throwing(kind);
			break;
		case 2:
			SCRT_Enemy2.Throwing(kind);
			break;
		case 5:
			SCRT_Enemy5.Throwing(kind);
			break;
		case 9:
			SCRT_Enemy9.Throwing(kind);
			break;
		case 10:
			SCRT_Enemy10.Throwing(kind);
			break;
		case 11:
			SCRT_Enemy11.Throwing(kind);
			break;
		case 12:
			SCRT_Enemy12.Throwing(kind);
			break;
		case 100:
			SCRT_Enemy100.Throwing(kind);
			break;
		case 101:
			SCRT_Enemy101.Throwing(kind);
			break;
		}
	}

	public void Damaged(Vector2 pos, AttackInfo attackInfo)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.Damaged(pos, attackInfo);
			break;
		case 1:
			SCRT_Enemy1.Damaged(pos, attackInfo);
			break;
		case 2:
			SCRT_Enemy2.Damaged(pos, attackInfo);
			break;
		case 5:
			SCRT_Enemy5.Damaged(pos, attackInfo);
			break;
		case 9:
			SCRT_Enemy9.Damaged(pos, attackInfo);
			break;
		case 10:
			SCRT_Enemy10.Damaged(pos, attackInfo);
			break;
		case 11:
			SCRT_Enemy11.Damaged(pos, attackInfo);
			break;
		case 12:
			SCRT_Enemy12.Damaged(pos, attackInfo);
			break;
		case 100:
			SCRT_Enemy100.Damaged(pos, attackInfo);
			break;
		case 101:
			SCRT_Enemy101.Damaged(pos, attackInfo);
			break;
		}
	}

	public void BodyTrailSwtich(float width)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.BodyTrailSwtich(width);
			break;
		case 1:
			SCRT_Enemy1.BodyTrailSwtich(width);
			break;
		case 2:
			SCRT_Enemy2.BodyTrailSwtich(width);
			break;
		case 5:
			SCRT_Enemy5.BodyTrailSwtich(width);
			break;
		case 9:
			SCRT_Enemy9.BodyTrailSwtich(width);
			break;
		case 10:
			SCRT_Enemy10.BodyTrailSwtich(width);
			break;
		case 11:
			SCRT_Enemy11.BodyTrailSwtich(width);
			break;
		case 12:
			SCRT_Enemy12.BodyTrailSwtich(width);
			break;
		case 100:
			SCRT_Enemy100.BodyTrailSwtich(width);
			break;
		case 101:
			SCRT_Enemy101.BodyTrailSwtich(width);
			break;
		}
	}

	public void ChangeWeaponTrailShowingTime(float time)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.ChangeWeaponTrailShowingTime(time);
			break;
		case 1:
			SCRT_Enemy1.ChangeWeaponTrailShowingTime(time);
			break;
		case 2:
			SCRT_Enemy2.ChangeWeaponTrailShowingTime(time);
			break;
		case 5:
			SCRT_Enemy5.ChangeWeaponTrailShowingTime(time);
			break;
		case 9:
			SCRT_Enemy9.ChangeWeaponTrailShowingTime(time);
			break;
		case 10:
			SCRT_Enemy10.ChangeWeaponTrailShowingTime(time);
			break;
		case 11:
			SCRT_Enemy11.ChangeWeaponTrailShowingTime(time);
			break;
		case 12:
			SCRT_Enemy12.ChangeWeaponTrailShowingTime(time);
			break;
		case 100:
			SCRT_Enemy100.ChangeWeaponTrailShowingTime(time);
			break;
		case 101:
			SCRT_Enemy101.ChangeWeaponTrailShowingTime(time);
			break;
		}
	}

	public void ChangeAnimatorSpeed(float speed)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.ChangeAnimatorSpeed(speed);
			break;
		case 1:
			SCRT_Enemy1.ChangeAnimatorSpeed(speed);
			break;
		case 2:
			SCRT_Enemy2.ChangeAnimatorSpeed(speed);
			break;
		case 5:
			SCRT_Enemy5.ChangeAnimatorSpeed(speed);
			break;
		case 9:
			SCRT_Enemy9.ChangeAnimatorSpeed(speed);
			break;
		case 10:
			SCRT_Enemy10.ChangeAnimatorSpeed(speed);
			break;
		case 11:
			SCRT_Enemy11.ChangeAnimatorSpeed(speed);
			break;
		case 12:
			SCRT_Enemy12.ChangeAnimatorSpeed(speed);
			break;
		case 100:
			SCRT_Enemy100.ChangeAnimatorSpeed(speed);
			break;
		case 101:
			SCRT_Enemy101.ChangeAnimatorSpeed(speed);
			break;
		}
	}

	public void ChangeCOL_AttackZoneName(string name)
	{
		switch (enemyNumber)
		{
		case 0:
			SCRT_Enemy0.COL_AttackZone.name = name;
			break;
		case 1:
			SCRT_Enemy1.COL_AttackZone.name = name;
			break;
		case 2:
			SCRT_Enemy2.COL_AttackZone.name = name;
			break;
		case 5:
			SCRT_Enemy5.COL_AttackZone.name = name;
			break;
		case 9:
			SCRT_Enemy9.COL_AttackZone.name = name;
			break;
		case 10:
			SCRT_Enemy10.COL_AttackZone.name = name;
			break;
		case 11:
			SCRT_Enemy11.COL_AttackZone.name = name;
			break;
		case 12:
			SCRT_Enemy12.COL_AttackZone.name = name;
			break;
		case 100:
			SCRT_Enemy100.COL_AttackZone.name = name;
			break;
		case 101:
			SCRT_Enemy101.COL_AttackZone.name = name;
			break;
		}
	}

	public void ShootArrow1()
	{
		switch (enemyNumber)
		{
		case 5:
			SCRT_Enemy5.ShootArrow();
			break;
		case 11:
			SCRT_Enemy11.ShootArrow();
			break;
		case 12:
			SCRT_Enemy12.ShootArrow();
			break;
		}
	}

	public void ShootHommingMagic1()
	{
		int num = enemyNumber;
		if (num == 100)
		{
			SCRT_Enemy100.ShootHommingMagic1();
		}
	}
}
